#!/bin/bash
# date: Sat Jul 30 15:41:23 CST 2022
# author: xkl
while read -p "输入数字" num
do
echo "$num" | grep -wE "[0-9]+"
if [ $? -eq 0 ];then
	echo -e "\e[32m是数字\e[0m"
	break;
else
	echo -e "\e[32m重新输入\e[0m"
fi
done;
